#!/bin/sh -eu

. "$(dirname "$0")/common.sh"

test_cleanup() {
    if mountpoint -q "$scratch_dir/mnt"; then
	umount "$scratch_dir/mnt"
    fi
}

assert_kconfig CONFIG_F2FS_FS
assert_kconfig CONFIG_KASAN y

curl -o "$scratch_dir/35.img.zip" \
     "https://bugzilla.kernel.org/attachment.cgi?id=276727"
unzip -d "$scratch_dir" "$scratch_dir/35.img.zip" 35.img

mkdir "$scratch_dir/mnt"
! mount -o loop -t f2fs "$scratch_dir/35.img" "$scratch_dir/mnt"

assert_untainted
